<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    /* var a={
      a:10,
      b:20
    }
    var b = {
      c:30,
      d:40
    }
    var c = Object.assign(a,b);
    console.log(c);
    var d = Object.assign({},a); */

    var obj = {
      a:10,
      b:20
    }
    console.log(JSON.stringify(obj));
    var b = JSON.stringify(obj);
    var b= JSON.parse(b);
  </script>
</body>
</html>